import React, {lazy, Suspense} from "react";

export const lazyLoading = (comPath:string) => {
    const Com = lazy(()=>import("@/pages/"+comPath))
    return (
        <Suspense fallback={<h3>加载中……</h3>}>
            <Com/>
        </Suspense>
    )
}